import {
	createRouter,
	createWebHistory
} from 'vue-router'

import Layout from '@/layout'
/**
常用的路由配置表，无需配置权限显示与否
 */
const constantRoutes = [{
	path: '/',
	meta: {
		title: '开发指南',
		icon: 'link'
	},
	component: Layout,
	children: [{
		path: '/npm',
		component: () => import('@/views/basic/common'),
		meta: {
			title: 'index',
			icon: 'link'
		}
	}],
}, {
	path: '/basic',
	meta: {
		title: '基础类名',
		icon: 'link'
	},
	component: Layout,
	children: [{
		path: '/basic/text',
		component: () => import('@/views/basic/text'),
		meta: {
			title: 'text',
			icon: 'link'
		}
	}, {
		path: '/basic/height',
		component: () => import('@/views/basic/height'),
		meta: {
			title: 'height',
			icon: 'link'
		}
	},{
		path: '/basic/width',
		component: () => import('@/views/basic/width'),
		meta: {
			title: 'width',
			icon: 'link'
		}
	},{
		path: '/basic/flex',
		component: () => import('@/views/basic/flex'),
		meta: {
			title: 'flex',
			icon: 'link'
		}
	}, {
		path: '/basic/position',
		component: () => import('@/views/basic/position'),
		meta: {
			title: 'posiiton',
			icon: 'link'
		}
	}, {
		path: '/basic/for',
		component: () => import('@/views/basic/for'),
		meta: {
			title: 'for循环相关',
			icon: 'link'
		}
	},  {
		path: '/basic/transform',
		component: () => import('@/views/basic/transform'),
		meta: {
			title: 'transform',
			icon: 'link'
		}
	},{
		path: '/basic/color',
		component: () => import('@/views/basic/color'),
		meta: {
			title: 'color',
			icon: 'link'
		}
	},{
		path: '/basic/common',
		component: () => import('@/views/basic/common'),
		meta: {
			title: '通用（其他）',
			icon: 'link'
		}
	}, ],
}, {
	path: '/cssDemo',
	meta: {
		title: 'cssDemo',
		icon: 'link'
	},
	component: Layout,
	children: [{
		path: '/cssDemo/accordion',
		component: () => import('@/views/cssDemo/accordion'),
		meta: {
			title: '手风琴',
			icon: 'link'
		}
	}, {
		path: '/cssDemo/boderAnimation',
		component: () => import('@/views/cssDemo/borderAnimation/index'),
		meta: {
			title: '边框动画',
			icon: 'link'
		}
	}, {
		path: '/cssDemo/catalogAnimation',
		component: () => import('@/views/cssDemo/catalogAnimation'),
		meta: {
			title: '目录菜单动画',
			icon: 'link'
		}
	},{
		path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
		meta: {
			title: '下拉框',
			icon: 'link'
		}
	}]
}]


const router = createRouter({
	history: createWebHistory(),
	routes: constantRoutes
})
export {
	router,
	constantRoutes
}
